export default {
  powerCounter(state) {
    return state.counter**2;
  },
  beyond20(state) {
    return state.students.filter(i => i.age >= 20);
  },
  // 第二个默认参数getters
  beyond20Len(state, getters) {
    return getters.beyond20.length;
  },
  beyondXStu(state) {
    return x => state.students.filter(i => i.age >= x);
  }
}